package com.dick.base.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dick.base.model.BusinessBoard;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

@Repository
public interface BusinessBoardMapper extends BaseMapper<BusinessBoard> {

    @Update("update business_board set quantity = quantity + #{quantity}, update_time = now() where id = #{id}")
    int increaseQuantity(@Param("id") Long id, @Param("quantity") Integer quantity);
}
